package com.member.shop.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.member.shop.domain.SysBizCoupon;
import com.member.shop.domain.SysBizCouponGrant;
import com.member.shop.domain.SysBizCouponReceive;
import com.member.shop.domain.SysBizUser;

/**
 * 优惠券发放Service接口
 *
 * @author lixinchen
 * @date 2024-05-08
 */
public interface ISysBizCouponGrantService extends IService<SysBizCouponGrant> {
    /**
     * 查询优惠券发放
     *
     * @param id 优惠券发放主键
     * @return 优惠券发放
     */
    public SysBizCouponGrant selectSysBizCouponGrantById(Long id);

    /**
     * 查询优惠券发放列表
     *
     * @param queryWrapper 优惠券发放
     * @return 优惠券发放集合
     */
    public List<SysBizCouponGrant> selectSysBizCouponGrantList(LambdaQueryWrapper<SysBizCouponGrant> queryWrapper);

    /**
     * 查询优惠券发放列表
     *
     * @param sysBizCouponGrant 优惠券发放
     * @return 优惠券发放集合
     */
    List<SysBizCouponGrant> selectSysBizCouponGrantList(SysBizCouponGrant sysBizCouponGrant);

    SysBizCouponReceive createCouponReceiveRecord(SysBizUser sysBizUser, SysBizCoupon sysBizCoupon, Integer sourceType) throws Exception;

    /**
     * 新增优惠券发放
     *
     * @param sysBizCouponGrant 优惠券发放
     * @return 结果
     */
    int insertSysBizCouponGrant(SysBizCouponGrant sysBizCouponGrant) throws Exception;

    int SysBizCouponGrantByUser(List<SysBizCoupon> sysBizCoupon,String userPhone) throws Exception;

    /**
     * 修改优惠券发放
     *
     * @param sysBizCouponGrant 优惠券发放
     * @return 结果
     */
    public int updateSysBizCouponGrant(SysBizCouponGrant sysBizCouponGrant);

    /**
     * 批量删除优惠券发放
     *
     * @param ids 需要删除的优惠券发放主键集合
     * @return 结果
     */
    public int deleteSysBizCouponGrantByIds(Long[] ids);

    /**
     * 删除优惠券发放信息
     *
     * @param id 优惠券发放主键
     * @return 结果
     */
    public int deleteSysBizCouponGrantById(Long id);
}